﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nicotool
{
   public class StrUrl
    {
       /// <summary>
       /// 登陆url
       /// </summary>
       public const string strLogin= "https://secure.nicovideo.jp/secure/login?site=niconico";
       /// <summary>
       /// flv信息网址
       /// </summary>
       public const string strInfo = "http://ext.nicovideo.jp/api/getflv/{0}?as3=1";

       /// <summary>
       /// 视频网址，参数sm号
       /// </summary>
       public const string strSm = "http://www.nicovideo.jp/watch/{0}";

       /// <summary>
       /// 评论信息字符串
       /// </summary>
       public const string strComment = @"<thread res_from=""-{0}"" version=""20061206"" thread=""{1}"" />";

       

       /// <summary>
       /// 动画ThumbInfo的网址
       /// </summary>
       public const string strThumb = "http://ext.nicovideo.jp/api/getthumbinfo/{0}";


       /// <summary>
       /// 获得视频网址
       /// </summary>
       /// <param name="id">sm号</param>
       /// <returns></returns>
       public static string getSmUrl(string id)
       {
           return string.Format(strSm, id);
       }

       /// <summary>
       /// 获得评论信息
       /// </summary>
       /// <param name="num">条数</param>
       /// <param name="ThreadId">线程id</param>
       /// <returns></returns>
       public static string getComment(int num, string ThreadId)
       {
           return string.Format(strComment, num.ToString(), ThreadId);
       }

       /// <summary>
       /// 获得flv信息
       /// </summary>
       /// <param name="id">参数sm号</param>
       /// <returns></returns>
       public static string getInfo(string id)
       {
           return string.Format(strInfo,id);
       }

       /// <summary>
       /// 获得动画ThumbInfo的网址
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public static string  getThumbInfo(string id)
       {
           return string.Format(strThumb, id);
       }
    }
}
